<?php
/**
 * @date        <!-- phpDesigner :: Timestamp [08-07-2010 01:26:12] -->
 * @filesource  class.stats.php
 * @package     WebCms
 * @copyright	Copyright (C) 2010
 * @author      Sérgio 'Horizak' Alves
 */

// Sem acesso directo
defined('_WEXEC') or die('Restricted access');

/**
 * Stats module
 *
 */
class Module_Stats extends Module {
  /**
   * Função construtora
   * 
   */
  function __construct() {

    $this->name = 'Stats';
    $this->patch = dirname(__file__).DS;
    parent::__construct();
  }

  /**
   * Get Stats
   * 
   */
  function getStats() {
    global $cms;
    $return['day'] = $cms->obj['stats']->totalDay();
    $return['yesterday'] = $cms->obj['stats']->totalYesterday();
    $return['month'] = $cms->obj['stats']->totalMonth();
    $return['total'] = $cms->obj['stats']->totalVisits();
    $return['total_users'] = $cms->obj['stats']->totalUsers();
    return $return;
  }
}
?>